package com.jz.community.modulemine.myCard.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jz.community.basecomm.bean.baseCardInfo.BaseCardInfo;
import com.jz.community.basecomm.utils.BaseImageLoaderUtils;
import com.jz.community.commview.view.SlantedTextView;
import com.jz.community.modulemine.R;

import java.util.List;

/**
 * Created by Tony.Fan on 2018/8/22 11:43
 */
public class CardInvalidAdapter extends BaseQuickAdapter<BaseCardInfo, BaseViewHolder> {

    public CardInvalidAdapter(List<BaseCardInfo> data) {
        super(R.layout.module_mine_item_card_my_invalid, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BaseCardInfo item) {

        BaseImageLoaderUtils.getInstance().loadDefaltImage(mContext, helper.getView(R.id.item_card_invalid_img), item.getBrandIcon());

        SlantedTextView st = helper.getView(R.id.item_card_invalid_status);

        helper.setText(R.id.item_card_invalid_name, item.getBrand());

        st.setText("已失效");
    }
}
